package com.ti.shangou.dao;

import com.ti.shangou.pojo.entity.Permission;
import com.ti.shangou.pojo.query.PermissionQuery;
import com.ti.shangou.pojo.vo.PermissionVO;
import com.ti.shangou.pojo.vo.RoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface PermissionDao {
    int deleteByPrimaryKey(Integer permissionId);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer permissionId);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

//    List<PermissionVO> selectPermissionsByRoles(@Param("roles") Collection<String> roles);

    List<PermissionVO> selectPermissionsByRoles(@Param("roles")Collection<String> permissions);

    List<PermissionVO> selectPermissionsList(PermissionQuery permissionQuery);

    Integer selectPermissionsCount();

    Integer deletePermissions(@Param("ids") List<PermissionVO> permissionVOS);

    List<PermissionVO> selectPermissionsByRole(RoleVO role);

    List<PermissionVO> selectPermissionsByRoleList(@Param("RoleList") List<RoleVO> roleVOS);
}